package com.kk.nb_order.remote;

import com.woniuxy.boot.common.bean.Policy;
import com.woniuxy.boot.common.bean.PolicyInsurance;
import com.woniuxy.boot.common.dto.OrderPayDTO;
import com.woniuxy.boot.common.pojo.ResponseResult;
import com.woniuxy.boot.common.pojo.ResultObj;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.time.LocalDateTime;

/**
 * @Author: K
 * @Date: 2024/12/16
 */
@FeignClient("nb-policy")
public interface PolicyService {

    @PostMapping("app/policy/add")
    ResultObj add(@RequestBody Policy policy);

    @GetMapping("app/policy/pay")
    ResultObj pay(@RequestParam("id") Long id,
                  @RequestParam("startTime") LocalDateTime startTime,
                  @RequestParam("endTime") LocalDateTime endTime);

    @PostMapping("app/policyInsurance/add")
    ResultObj addPolicyInsurance(@RequestBody PolicyInsurance policyInsurance);
}
